/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Rodunu.Movies.Contracts
{
	/// <summary>
	/// UserMovies object for NHibernate mapped table 'UserMovies'.
	/// </summary>
	[Serializable]
	public class UserMovies : IIdentifier
	{
		#region Member Variables
		protected Movie _movie;
		protected UserInfo _userinfo;
		protected bool _viewed;
		protected MovieTypes _movietypes;
		protected long _id;
		protected UserCollections _usercollections;
		protected string _location;
		protected Condition _condition;
		protected string _additionalinfo;
		protected DateTime _dateadded;
		protected DateTime _lastmodified;
		#endregion
		#region Constructors
			
		public UserMovies() {}
					
		public UserMovies(Movie movie, UserInfo userinfo, bool viewed, string location, string additionalinfo, DateTime dateadded, DateTime lastmodified) 
		{
			this._movie= movie;
			this._userinfo= userinfo;
			this._viewed= viewed;
			this._location= location;
			this._additionalinfo= additionalinfo;
			this._dateadded= dateadded;
			this._lastmodified= lastmodified;
		}

		public UserMovies(Movie movie, UserInfo userinfo, bool viewed)
		{
			this._movie= movie;
			this._userinfo= userinfo;
			this._viewed= viewed;
		}
		
		#endregion
		#region Public Properties

	    public virtual string Name { get; set; }
		public  virtual Movie Movie
		{
			get { return _movie; }
			set {_movie= value; }
		}
		public  virtual UserInfo UserInfo
		{
			get { return _userinfo; }
			set {_userinfo= value; }
		}
		public  virtual bool Viewed
		{
			get { return _viewed; }
			set {_viewed= value; }
		}
		public  virtual MovieTypes MovieTypes
		{
			get { return _movietypes; }
			set {_movietypes= value; }
		}
		public  virtual long Id
		{
			get { return _id; }
			set {_id= value; }
		}
		public  virtual UserCollections UserCollections
		{
			get { return _usercollections; }
			set {_usercollections= value; }
		}
		public  virtual string Location
		{
			get { return _location; }
			set {_location= value; }
		}
		public  virtual Condition Condition
		{
			get { return _condition; }
			set {_condition= value; }
		}
		public  virtual string AdditionalInfo
		{
			get { return _additionalinfo; }
			set {_additionalinfo= value; }
		}
		public  virtual DateTime DateAdded
		{
			get { return _dateadded; }
			set {_dateadded= value; }
		}
		public  virtual DateTime LastModified
		{
			get { return _lastmodified; }
			set {_lastmodified= value; }
        }
        public virtual UserInfo DateAddedBy { get; set; }
        public virtual UserInfo LastModifiedBy { get; set; }
	    public virtual IList<FriendMovieRequest> FriendMovieRequests { get; set; }
	    public virtual UserMoviesStatus UserMoviesStatus { get; set; }
	    public virtual long? ParentId { get; set; }
	    public virtual bool IsCollection { get; set; }
	    public virtual bool IsFavorite { get; set; }
        public virtual int? Ranking { get; set; }
        public virtual string Notes { get; set; }

		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			UserMovies castObj = (UserMovies)obj;
			return ( castObj != null ) &&
			this._id == castObj.Id;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _id.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
